package org.dean.webapps.projectname.presentation.utils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * Created by IntelliJ IDEA.
 * User: gur01
 * Date: Aug 15, 2011
 * Time: 3:44:44 PM
 * To change this template use File | Settings | File Templates.
 */


public class PresentationUtils {

    public static final String SESSION_USER = "session_user";

    public static void setUserLogin(HttpServletRequest request) {

        HttpSession session = request.getSession();
        session.setAttribute(SESSION_USER, "LOGGED_IN");
        request.setAttribute(SESSION_USER, "LOGGED_IN");
    }

    public static void setUserLogout(HttpServletRequest request) {

        HttpSession session = request.getSession();
        session.removeAttribute(SESSION_USER);
        request.removeAttribute(SESSION_USER);
    }


}
